<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: WebRTCommClient</title>
    
    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">
    
    <h1 class="page-title">Class: WebRTCommClient</h1>
    
    



<section>
    
<header>
    <h2>
        <span class="ancestors"><a href="module-WebRTComm.html">WebRTComm</a>~</span>
    
    WebRTCommClient
    </h2>
    
        <div class="class-description">Main class of the WebRTComm Framework providing high level communication service: call and be call</div>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
<dt>
    <h4 class="name" id="WebRTCommClient"><span class="type-signature"></span>new WebRTCommClient<span class="signature">(eventListener)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>eventListener</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">event listener object implementing WebRTCommClient and WebRTCommCall listener interface</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="WebRTComm.js.html">WebRTComm.js</a>, line 4755
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

    
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Members</h3>
        
        <dl>
            
<dt>
    <h4 class="name" id="SIP"><span class="type-signature">&lt;constant> </span>SIP<span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    <div class="description">
        SIP call control protocol mode
    </div>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="WebRTComm.js.html">WebRTComm.js</a>, line 4777
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
</dd>

        </dl>
    
    
    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <h4 class="name" id="call"><span class="type-signature"></span>call<span class="signature">(calleePhoneNumber, callConfiguration)</span><span class="type-signature"> &rarr; {WebRTCommCall}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Request a WebRTC communication, asynchronous action, call events are notified to the eventListener
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>calleePhoneNumber</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Callee contact identifier (Tel URI, SIP URI: sip:bob@sip.net)</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>callConfiguration</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Communication configuration <br><p> Communication configuration sample: <br>{ <br><span style="margin-left: 30px">displayName:alice,<br></span><span style="margin-left: 30px">localMediaStream: [LocalMediaStream],<br></span><span style="margin-left: 30px">audioMediaFlag:true,<br></span><span style="margin-left: 30px">videoMediaFlag:false,<br></span><span style="margin-left: 30px">dataMediaFlag:false,<br></span><span style="margin-left: 30px">audioCodecsFilter:PCMA,PCMU,OPUS,<br></span><span style="margin-left: 30px">videoCodecsFilter:VP8,H264,<br></span><span style="margin-left: 30px">opusFmtpCodecsParameters:maxaveragebitrate=128000,<br></span>}<br></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="WebRTComm.js.html">WebRTComm.js</a>, line 4962
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    new created WebRTCommCall object
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">WebRTCommCall</span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="close"><span class="type-signature"></span>close<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Close the WebRTC communication client, asynchronous action, closed event is notified to the eventListener
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="WebRTComm.js.html">WebRTComm.js</a>, line 4870
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getConfiguration"><span class="type-signature"></span>getConfiguration<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Get client configuration
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="WebRTComm.js.html">WebRTComm.js</a>, line 4797
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    configuration
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">object</span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="isOpened"><span class="type-signature"></span>isOpened<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Get opened/closed status
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="WebRTComm.js.html">WebRTComm.js</a>, line 4785
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    true if opened, false if closed
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">boolean</span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="open"><span class="type-signature"></span>open<span class="signature">(configuration)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Open the WebRTC communication client, asynchronous action, opened or error event are notified to the eventListener
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>configuration</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">WebRTC communication client configuration <br><p> Client configuration sample: <br>{ <br><span style="margin-left: 30px">communicationMode:WebRTCommClient.prototype.SIP,<br></span><span style="margin-left: 30px">sip: {,<br></span><span style="margin-left: 60px">sipUriContactParameters:undefined,<br></span><span style="margin-left: 60px">sipUserAgent:"WebRTCommTestWebApp/0.0.1",<br></span><span style="margin-left: 60px">sipUserAgentCapabilities=undefined,<br></span><span style="margin-left: 60px">sipOutboundProxy:"ws://localhost:5082",<br></span><span style="margin-left: 60px">sipDomain:"sip.net",<br></span><span style="margin-left: 60px">sipUserName:"alice",<br></span><span style="margin-left: 60px">sipLogin:"alice@sip.net,<br></span><span style="margin-left: 60px">sipPassword:"1234567890",<br></span><span style="margin-left: 60px">sipRegisterMode:true,<br></span><span style="margin-left: 30px">}<br></span><span style="margin-left: 30px">RTCPeerConnection: {,<br></span><span style="margin-left: 60px"stunServer:undefined,<br></span><span style="margin-left: 30px">}<br></span>}<br> </p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="WebRTComm.js.html">WebRTComm.js</a>, line 4829
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="sendMessage"><span class="type-signature"></span>sendMessage<span class="signature">(to, text)</span><span class="type-signature"> &rarr; {WebRTCommMessage}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Send a short text message using transport (e.g SIP)  implemented by the connector
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            
            
            <td class="description last">destination identifier (Tel URI, SIP URI: sip:bob@sip.net)</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>text</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Message to send <br></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="WebRTComm.js.html">WebRTComm.js</a>, line 4913
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    new created WebRTCommMessage object
</div>



<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type">WebRTCommMessage</span>


	</dd>
</dl>

        
    
    
</dd>

        </dl>
    
    
    
    
    
</article>

</section>  




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-WebRTComm.html">WebRTComm</a></li></ul><h3>Classes</h3><ul><li><a href="fc0c5d343d.html">WebRTCommCall</a></li><li><a href="25bbf3c560.html">WebRTCommCallEventListenerInterface</a></li><li><a href="f1810eae06.html">WebRTCommClient</a></li><li><a href="4f7c1fc693.html">WebRTCommClientEventListenerInterface</a></li><li><a href="281ec49c1e.html">WebRTCommMessage</a></li><li><a href="87b7341681.html">WebRTCommMessageEventListenerInterface</a></li></ul>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Sep 25 2013 10:52:30 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
</body>
</html>
